-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Refine how we detect namespace packages #12169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
24566c5 to
504ceeb
Compare
bluetech
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new approach makes sense to me (as far as I understand the details). I left a couple of questions.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
bluetech
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
Previously we used a hand crafted approach to detect namespace packages, however we should rely on ``importlib`` to detect them for us. Fix pytest-dev#12112
Co-authored-by: Ran Benita <[email protected]>
This makes it more clear what is the purpose of the start variable.
Removed the test for standalone module because for some reason it was flaky (could not figure why).
aefa523 to
981e399
Compare
|
Thanks @bluetech for the review. I will leave this open for a few more days to give others a chance to review too (which would be appreciated). |
This is better to enforce callers to check for it instead of ending up with '' and possibly breaking later.
34196a9 to
1e22e0f
Compare
|
Hi, this got marked as an improvement. Isn’t this a bugfix? I’m asking because we’re trying to gauge how long we can expect to wait for a release containing this. |
|
Good question, decided to go with "improvement" because it contains significant changes on how things work -- seemed safe to release this in the next minor release instead of a bug-fix release. But it is not set in stone, if we think this is OK to go as a bug fix we can change that, for sure. |
Previously we used a hand crafted approach to detect namespace packages, however we should rely on
importlibto detect them for us.Fix #12112